package com.truthbean.jeetb.api.service.oschina;

import com.truthbean.jeetb.api.config.oschina.Config;
import com.truthbean.jeetb.utils.NetWorkUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.json.JSONObject;
import org.json.XML;

/**
 * Created by TruthBean on 2016-10-22 14:43.
 */
public class BlogService {
    private Logger logger = LogManager.getLogger(getClass());

    public String getBlogList() {
        String xmlStr = NetWorkUtils.doHttpGet(Config.BLOG_LIST + "?pageSize=" + 768);
        JSONObject json = XML.toJSONObject(xmlStr);
        logger.info(json);
        return json.toString();
    }
}
